/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication4.model;

import javax.swing.event.EventListenerList;

/**
 *
 * @author mathieubakrim
 */
public class Contact {
        private String lastName ="";
	private String firstName ="";
	private String phoneNumber ="";
	private String addressPro ="";
	private String addressPer ="";
	private String homePage ="";
	private String emailPro ="";
	private String emailPer ="";
        
        private EventListenerList listeners;

    public Contact() {
    }

    public Contact(String lastName, String firstName, String phoneNumber, String addressPro, String addressPer, String homePage, String emailPro, String emailPer) {
        super();
        this.lastName = lastName;
        this.firstName = firstName;
        this.phoneNumber = phoneNumber;
        this.addressPro = addressPro;
        this.addressPer = addressPer;
        this.homePage = homePage;
        this.emailPro = emailPro;
        this.emailPer = emailPer;

        
        listeners = new EventListenerList();
    }

 
    

    @Override
    public String toString() {
        return "Contact{" + "lastName=" + lastName + ", firstName=" + firstName + 
                ", phoneNumber=" + phoneNumber + ", addressPro=" + addressPro + 
                ", addressPer=" + addressPer + ", homePage=" + homePage + 
                ", emailPro=" + emailPro + ", emailPer=" + emailPer + '}';
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
        contactChanged();
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
        contactChanged();
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
        contactChanged();
    }

    public String getAddressPro() {
        return addressPro;
    }

    public void setAddressPro(String addressPro) {
        this.addressPro = addressPro;
        contactChanged();
    }

    public String getAddressPer() {
        return addressPer;
    }

    public void setAddressPer(String addressPer) {
        this.addressPer = addressPer;
        contactChanged();
    }

    public String getHomePage() {
        return homePage;
    }

    public void setHomePage(String homePage) {
        this.homePage = homePage;
        contactChanged();
    }

    public String getEmailPro() {
        return emailPro;
    }

    public void setEmailPro(String emailPro) {
        this.emailPro = emailPro;
        contactChanged();
    }

    public String getEmailPer() {
        return emailPer;
    }

    public void setEmailPer(String emailPer) {
        this.emailPer = emailPer;
        contactChanged();
    }

    private void contactChanged() {
        //ContactListener[] listenerList = (ContactListener[])listeners.getListeners(ContactListener.class);
 
		//for(ContactListener listener : listenerList){
			//listener.volumeChanged(new ContactChangedEvent(this, );
                //}
    }
}
